package main

import (
	"gitee.com/ymofen/gobase"
	"github.com/spf13/cobra"
	_ "gnssa/pkg/spcpy"
	_ "kpl-plugs/sp/ntripcaster"
)

func main() {

	var rootCmd = &cobra.Command{
		Use:   "file2caster",
		Short: "file2caster",
	}

	gobase.ArgFuncRange("corbaRoot", gobase.ById, func(id string, opt gobase.ArgFuncOption) bool {
		cmd, err := opt.Func("", opt.Tag)
		if err != nil {
			gobase.Warnf("%s %s", id, err.Error())
		} else {
			rootCmd.AddCommand(cmd.(*cobra.Command))
		}
		return true
	})

	rootCmd.Execute()

}
